/*格式化用户输入的金额，自动保留两位小数*/
function clearNoNum(obj)
{
    obj.value = obj.value.replace(/[^\d.]/g,"");
    obj.value = obj.value.replace(/\.{2,}/g,".");
    obj.value = obj.value.replace(/^\./g,"");
    obj.value = obj.value.replace(".","$#$").replace(/\./g,"").replace("$#$",".");
    obj.value = obj.value.replace(/^(\-)*(\d+)\.(\d\d).*$/,'$1$2.$3');
    obj.value = parseFloat(obj.value).toFixed(2);
}
/*防重复点击*/
function disabledButton(buttonId) {
    $('#' + buttonId).addClass('layui-btn-disabled');
    $('#' + buttonId).attr('disabled', 'disabled');
}
function undisabledButton(buttonId) {
    $('#' + buttonId).removeClass('layui-btn-disabled');
    $('#' + buttonId).removeAttr('disabled');
}
